<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>短信营销</title>
    <link rel="shortcut icon" href="favicon.ico">

    <link href="<%=path%>/hplus/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="<%=path%>/hplus/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/animate.min.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	<link href="<%=path%>/hplus/css/plugins/clockpicker/clockpicker.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="<%=path%>/hplus/js/plugins/sweetalert/sweetalert2.min.css">
    <link href="<%=path%>/css/marketing/s_style.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/chosen/chosen.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/colorpicker/css/bootstrap-colorpicker.min.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/cropper/cropper.min.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/switchery/switchery.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/jasny/jasny-bootstrap.min.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/nouslider/jquery.nouislider.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/ionRangeSlider/ion.rangeSlider.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css" rel="stylesheet">

    <style> 
        .radio label{
            padding-left: 0;
        }

        .date{
            margin: -8px 20px 0 0;
        }

        .clockpicker{
            margin-top: -8px;
        }

        .i-checks label{
            float: left;
            margin-right: 10px;
        }

        .col-sm-offset-1{
            margin-top: 20px;
        }

        .tishi{
            margin-top: 7px;
            
        }

        .alert{
            position:absolute;
            top: -15px;
            left: 8%;
            display:none;
        }
        .text-center{
            width:50%;
            margin: 10px 0 20px;
        }
        .s_phone_bg{
        	background:url('<%=path%>/images/marketing/img_mobile.png') no-repeat;
        	background-size:100% 100%;
        	height:596px;
        }

        .s_textarea{
        	background:#e5e5ea;
        	position: absolute;
		    top: 200px;
		    left: 150px;
		    width:165px;
		    border-radius:10px;
		    padding:6px;
        }
                /* .col-sm-8{
        	border-right:1px solid #ddd;
        } */
    </style>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content">
        <!-- <div class="x_progress">
            <div class="s_line">
                <div class="s_progress_bar s_current" role="progressbar"
                     aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
                    <span class="sr-only_1">1</span>
                    <p class="x_color_bz">选择发送目标</p>
                </div>
                <div class="s_progress_bar s_current" role="progressbar"
                     aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
                    <span class="sr-only_2">2</span>
                    <p class="x_color_bz">编辑发送内容</p>
                </div>
            </div>
        </div> -->
        <div class="col-md-12 ibox-content">
	        <div class="col-sm-8">
	            <div class="text-center" style="width:100%"><h3>编辑短信</h3></div>
	            <form method="get" class="form-horizontal">
	                <div class="form-group">
	                    <label class="col-sm-1 control-label">批次名称</label>
	                    <div class="col-sm-6">
	                        <input id="name" type="text" class="form-control" placeholder="给这批短信起个名字，方便以后统计" maxlength="15" onblur="checkLength(this)">
	                    </div>
	                </div>
	                 <div class="form-group">
	                    <label class="col-sm-1 control-label" data-toggle="modal" data-target="#myModal5">短信签名</label>
	                    <div class="col-sm-6">
	                        <select id="autograph" class="form-control" name="account" onchange="reloadCountWordNum()">
	                            <option>zhfeat</option>
	                            <option>选项 2</option>
	                            <option>选项 3</option>
	                            <option>选项 4</option>
	                        </select>
	                    </div>
	                    <%-- <div class="tishi col-sm-5" style="position:relative;margin-left:-15px">
	                        <img src="<%=path%>/images/marketing/help.png" />
	                        <div class="col-sm-4 alert alert-success">
	                            	如果没有签名，请联系您的售后人员。<!-- <a class="alert-link" href="notifications.html#">了解更多</a> -->
	                        </div> --%>
	                    </div>                    
	                </div>
	
	               <div class="form-group">
	                    <label class="col-sm-1 control-label">插入链接</label>
	                        <div class="col-sm-6">
	                            <div class="input-group">
	                                <input type="text" class="form-control" id="testNoBtn" style="position:relative">
	                                <i id="cleanActivity" class="fa fa-times-circle" style="position:absolute;display:inline-block;right:25px;top:10px;z-index:232"></i>
	                                <div class="input-group-btn">
	                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
	                                        <span class="caret"></span>
	                                    </button>
	                                    <ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>
	                                </div>
	                                <!-- /btn-group -->
	                            </div>
	                        </div>
	                    <%-- <div class="tishi col-sm-5" style="position:relative;margin-left:-15px">
	                        <img src="<%=path%>/images/marketing/help.png" />
	                        <div class="col-sm-4 alert alert-success">
	                            	没有活动去社交营销创建吧 <!-- <a class="alert-link" href="notifications.html#">了解更多</a> -->
	                        </div>
	                    </div> --%>
	                </div>
	
	                <div class="form-group">
	                    <label class="col-sm-1 control-label">短信内容</label>
	                    <div class="input-group m-b col-sm-6" style="padding-left:15px;float:left;">
			                  <span class="input-group-addon">变量</span>
			                  <select id="variableSmsSelect" class="form-control" name="account" onchange="reloadCountWordNum()">
						         <option selected="" value="[会员名称]">会员名称</option>
			                  </select>
			                  <span class="input-group-addon"><i id="addSmsVariable" class="fa fa-plus"></i></span> 
		                  </div>
	                   
	                </div>
	                <div class="form-group" style="margin-top:-15px">
	                    <label class="col-sm-1 control-label"></label>
	                    <div class="col-sm-6">                      
	                        <textarea oninput="reloadCountWordNum()" style="height:100px;" id="ccomment" name="comment" class="form-control" required="" aria-required="true"></textarea>                       
		                    <div class=" text-right"> 
		                       <h6 class="col-sm-9 "></h6> <span class="text-right" id="current">70</span><span>/</span><span id="remain" class="text-left">0</span><span>条</span>
		                    </div>
	                    </div>
	                    <%--  <div class="tishi col-sm-5" style="position:relative;margin-left:-10px">
	                        <img src="<%=path%>/images/marketing/help.png" />
	                        <div class="col-sm-4 alert alert-success">
	                                                                                       短信默认70字符，含回复TD退订及签名字符，如选择活动，默认扣除19个短链字符！
	                        </div>
	                    </div>    --%>   
	                </div>
	
	                <div class="form-group">
	                    <label class="col-sm-1 control-label">添加标签</label>
	                    <div class="col-sm-6">
	                        <input id="tag" type="text" class="form-control" maxlength="10" onblur="checkLength(this)"> <span class="help-block m-b-none">认真填写标签，有助于您更精确的找到客户</span>
	                    </div>
	                </div>
	
	                <div class="form-group">
	                    <label class="col-sm-1 control-label" style="visibility: hidden"></label>
	                    <div class="col-sm-6 col-sm-offset-1  text-center" style="width:100%">
	                        <button onclick="javascript:preStep();" type="button" class="btn btn-outline btn-primary" style="margin-right:20px;">取消</button>
	                        <button onclick="javascript:save();" type="button" class="btn  btn-primary">保存</button>
	                    </div>
	                   
	                </div>                
	            </form>
	        </div>
	        
	        <div class="col-sm-4" hidden="">
	           <h3 style="text-align:center;">页面展示区域</h3>
	            <div class="s_phone_bg">
	            	<p class="s_textarea"></p>
	            </div>
	        </div>
        </div>    
    </div>

    <div hidden="" class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header" style="padding: 15px 15px 10px;">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="text-left">提示</h4>
                </div>
                <div class="text-center" style="width:100%;height:60px;">
                    <p>您还没有签名，请创建签名</p>
                    <form method="get" class="form-horizontal col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-4 control-label">短信签名</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control">
                            </div>
                        </div>
                    </form>
                </div>
                 <div class="modal-footer" style="text-align:center;border-top:none;">
                     <button type="button" class="btn btn-primary k_verify">提交审核</button>
                 </div>
             </div>
        </div>
    </div> 


    <!-- 测试发送弹框 -->
    <div hidden="" class="modal inmodal fade" id="myModal6" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header" style="padding: 15px 15px 10px;">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="text-left">测试发送</h4>
                </div>
                <div class="text-center" style="width:100%;height:60px;">                    
                    <form method="get" class="form-horizontal col-sm-12" style="margin-top:30px;">
                        <div class="form-group">
                            <label class="col-sm-4 control-label">测试号码</label>
                            <div class="col-sm-8">
                                <input id="test_phone" type="text" class="form-control">
                            </div>
                        </div>
                    </form>
                </div>
                 <div class="modal-footer" style="text-align:center;border-top:none;">
                     <button onclick="javascript:save('test');" type="button" class="btn btn-primary k_verify">发送</button>
                 </div>
             </div>
        </div>
    </div> 

    <script src="<%=path%>/hplus/js/jquery.min.js?v=2.1.4"></script>
    <script src="<%=path%>/hplus/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="<%=path%>/hplus/js/plugins/chosen/chosen.jquery.js"></script>
    <script src="<%=path%>/hplus/js/plugins/jsKnob/jquery.knob.js"></script>
    <script src="<%=path%>/hplus/js/plugins/jasny/jasny-bootstrap.min.js"></script>
    <script src="<%=path%>/hplus/js/plugins/datapicker/bootstrap-datepicker.js"></script>
    <script src="<%=path%>/hplus/js/plugins/prettyfile/bootstrap-prettyfile.js"></script>
    <script src="<%=path%>/hplus/js/plugins/switchery/switchery.js"></script>
    <script src="<%=path%>/hplus/js/plugins/ionRangeSlider/ion.rangeSlider.min.js"></script>
    <script src="<%=path%>/hplus/js/plugins/iCheck/icheck.min.js"></script>
    <script src="<%=path%>/hplus/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="<%=path%>/hplus/js/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
    <script src="<%=path%>/hplus/js/plugins/clockpicker/clockpicker.js"></script>
    <script src="<%=path%>/hplus/js/plugins/cropper/cropper.min.js"></script>
    
    <script src="<%=path%>/hplus/js/demo/form-advanced-demo.min.js"></script>
	<script src="<%=path%>/hplus/js/plugins/suggest/bootstrap-suggest.min.js"></script>
    <script src="<%=path%>/hplus/js/plugins/sweetalert/sweetalert2.min.js"></script>
    <script type="text/javascript" src="<%=path%>/js/marketing/dialog.js"></script>
	<script type="text/javascript" src="<%=path%>/js/marketing/public.js"></script>
	<script type="text/javascript" src="<%=path%>/js/marketing/lengthlimit.js"></script>
	   <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>

	<script type="text/javascript">
		var showText = "[活动短链]";
		var activityId = getUrlParam("activityId");
		
	    function getUrlParam(key){
	    	var reg = new RegExp("(^|&)"+ key +"=([^&]*)(&|$)");
	        var r = window.location.search.substr(1).match(reg);
	        if(r!=null)return  unescape(r[2]); return null;
	    }
	    
		$('#send_now').on('ifChecked', function(event){
			console.log("send_now---------->");
			sendTimeType=0;
	    });
	
		$('#send_timer').on('ifChecked', function(event){
			console.log("send_timer---------->");
			sendTimeType=1;
	    });
		
		$('#cleanActivity').on('click', function(event){
			$('#testNoBtn').val("");
			activity_id=0;
			activity_url="";
			refreshContent();
			
	    });
		
		function refreshContent(){
			console.log(shortUrl);
			var newContent="";
			var content=$('#ccomment').val();
			console.log("content-->"+content);
			var splitContent=content.split(showText);
			for(var i=0;i<splitContent.length;i++){
				if(splitContent[i]!=shortUrl){
					newContent=newContent+splitContent[i];
				}
			}
			$('#ccomment').val(newContent);
			shortUrl="";
			reloadCountWordNum();
		}
		
		 $('#addSmsVariable').on('click', function(event){
		    	var smsVariable=$("#variableSmsSelect  option:selected").val();
		    	$('#ccomment').val($('#ccomment').val()+smsVariable);
		    	reloadCountWordNum();
		    });
	
	
	</script>
	
	
    <script>
        //$(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
       
        var access_token=$.cookie('access_token');
    	var cid=$.cookie('cid');
    	var uid=$.cookie('uid');
    	
        //批次名称
        var name="";
        //签名id
        var autograph_id="";
        //签名名称
        var autograph_name="";
        //活动id
        var activity_id="";
        //短信内容
        var sms_content="";
        //发送时间
        var send_time="";
        //标签
        var tag;
        //活动批次id
        var id="";
        //操作类型（创建，编辑，复制）
        var type="";
        //活动名称
        var activityName="";
        
        var  activity_url="";
        //测试短信发送号码
        var  testPhone="";
        
        var noActivity=false;
        
        var sendTimeObj=new Object();
        
        var sendTimeFlag="now";
        
        var copyId="";
        var send_status=0;
        var deleteFlag=false;
        var sendTimeType=0;
        //标记是否为创建
        var createFlag=true;
        var template_id="";
        
        $(function(){
        	
        	
        	
            $('.tishi img').mouseover(function(){
                $(this).parent().find('.alert').show();
            });
            $('.tishi img').mouseout(function(){
                $(this).parent().find('.alert').hide();
            });
            id=getQueryString("id");
            type=getQueryString("type");
            template_id=getQueryString("template_id");
            getAutographList();
            
            if(type=="edit"){
            	createFlag=false;
            	getSmsData(id);
            }else if(type=="copy"){
            	getSmsData(copyId);
            	deleteFlag=true;
            	createFlag=false;
            }else{
            	deleteFlag=true;
            	createFlag=true;
            }
            var testBsSuggest = $("#testNoBtn").bsSuggest({
                url: "<%=path%>/activity/ajaxSmsActivity?cid="+cid+"&uid="+uid+"&access_token="+access_token+"&name=",
                showBtn: false,
                delayUntilKeyup: true,
                effectiveFields: ["name"],
                idField: "id",
                keyField: "name"
            }).on("onDataRequestSuccess", function (e, result) {
                console.log("onDataRequestSuccess: ", result);
            }).on("onSetSelectValue", function (e, keyWrod) {
            	activity_id=keyWrod.id;
            	activityName=keyWrod.name;
            	noActivity=false;
            	refreshContent();
            	getShortUrl();
            }).on("onUnsetSelectValue", function (e) {
            	noActivity=true;
            });
            
           
        })
        
        function getShortUrl(){
        	var url="<%=path%>/activity/ajaxActivityUrlToShort";
    		$.post(url, {
    			"access_token" : access_token,
    			"cid" : cid,
    			"id" : activity_id,
    			
    		}, function(data) {
    			
    			if (data.status == 200) {
    				shortUrl=data.data;
    				refreshContent();
//     				$("#ccomment").val($("#ccomment").val()+data.data);
    				$("#ccomment").val($("#ccomment").val()+showText);
    				shortUrl=data.data;
    				reloadCountWordNum();
    			}else{
	        		errorDialog(data.message);
	        	}
    		});
        }
        
        //获取短信数据
        function getSmsData(id){
        	var url="<%=path%>/smsBatch/ajaxSmsBatchDetail";
    		$.post(url, {
    			"access_token" : access_token,
    			"cid" : cid,
    			"uid" : uid,
    			"id" : id,
    			
    		}, function(data) {
    			if (data.status == 200) {
    				initHtml(data.data);
    			}else if(data.status=="20028"){
	        		loginDialog();
	        	}else{
	        		errorDialog("获取数据失败",data.message);
	        	}
    		});
        }
        //初始化页面
        function initHtml(data){
        	console.log("data.activity_id---->"+data.activityId);
        	activityName=data.activityName;
        	activity_id=data.activityId;
        	name=data.name;
        	tag=data.tag;
        	autograph_name=data.autograph;
        	sms_content=data.content;
        	send_time=data.send_time;
        	sendTimeType=data.send_time_type;
        	
        	$("#name").val(name);
        	$("#ccomment").val(sms_content);
        	$("#tag").val(tag);
        	$('#testNoBtn').val(activityName);
        	
        	
        	
   
        		var count=$("#autograph option").length;

   		    for(var i=0;i<count;i++){
   		        if($("#autograph ").get(0).options[i].text == autograph_name) {
   		            $("#autograph ").get(0).options[i].selected = true;  
   		            break;  
   		        }  
   		    }
        	if(activity_id!=''&&activity_id!=0){
        		getShortUrl();
        	}
        	reloadCountWordNum();
        }
        
        
        //获取标签列表
        function getAutographList(){
        	var url="<%=path%>/smsAutograph/ajaxAutographList";
    		$.post(url, {
    			"access_token" : access_token,
    			"cid" : cid,
    			"uid" : uid,
    			"id" : id,
    		}, function(data) {
    			
    			if (data.status == 200) {
    				setAutographHtml(data.data);
    			}else if(data.status=="20028"){
	        		loginDialog();
	        	}else{
	        		swal(
	        				"获取短信签名失败",
	        				"您还未设置短信签名，请联系您的售后人员创建短信签名，然后再来编辑短信批次内容！",
	            		    'error'
	            		  ).then(function () {
	            			  window.location.href='<%=path%>/view/automarket/automatedOperation';
	            		})
	        	}
    		});
        }
        
        //设置签名
        function setAutographHtml(data){
        	var html='';
        	for(var i in data){
        		html+='<option>'+data[i].name+'</option>'
        	}
        	$('#autograph').html(html);
        	reloadCountWordNum();
        }
        
        function save(){
        	
        	name=$('#name').val();
        	autograph_name=$("#autograph  option:selected").text();
        	sms_content=$('#ccomment').val();
        	tag=$('#tag').val();
        	
        	if(noActivity){
        		$('#myModal6').modal("hide");
        		errorDialog("保存失败","您选择的活动不存在，请重新选择!");
        		return "";
        	}
        	if(StringEmpty(name)&&StringEmpty(autograph_name)&&StringEmpty(sms_content)&&StringEmpty(tag)){
        		if(createFlag){
        			create();
        		}else{
        			update();
        		}
        	}else if(!StringEmpty(name)){
        		promptDialog("请输入短信批次名称");
        	}else if(!StringEmpty(autograph_name)){
        		promptDialog("请输入选择短信签名");
        	}else if(!StringEmpty(sms_content)){
        		promptDialog("请输入短信内容");
        	}else if(!StringEmpty(tag)){
        		promptDialog("请输入标签内容");
        	}
        }
        
        function create(){
        	var url="<%=path%>/smsBatch/createByAutoMarket";
    		$.post(url, {
    			"access_token" : access_token,
    			"cid" : cid,
    			"uid" : uid,
    			"name" : name,
    			"autograph" : autograph_name,
    			"content" : sms_content,
    			"tag" : tag,
    			"activityId" : activity_id,
    			"activityUrl":activity_url,
    			"sendStatus":send_status,
    			"equivalenNum":smsPriceNum,
    			"type":1,
    			"templateId":template_id,
    		}, function(data) {
    			if (data.status == 200) {
    				console.log("创建成功");
    				console.log("创建成功id----->"+data.data.id);
    				parent.$("#actionId").html(data.data.id);
    				parent.$("#module-sms").iziModal('close');
    				$("#actionCommit", window.parent.document).click();
    			}else if(data.error_code=="20028"){
	        		loginDialog();
	        	}else{
	        		errorDialog(data.message);
	        	}
    		});
        }
        
        function update(){
        	var url="<%=path%>/smsBatch/updateByAutoMarket";
    		$.post(url, {
    			"access_token" : access_token,
    			"cid" : cid,
    			"uid" : uid,
    			"id" : id,
    			"name" : name,
    			"autograph" : autograph_name,
    			"content" : sms_content,
    			"tag" : tag,
    			"activityId" : activity_id,
    			"activityUrl":activity_url,
    			"sendStatus":send_status,
    			"equivalenNum":smsPriceNum,
    			"type":1,
    		}, function(data) {
    			if (data.status == 200) {
    				parent.$("#actionId").html(id);
    				parent.$("#module-sms").iziModal('close');
    				$("#actionCommit", window.parent.document).click();
    				createFlag=false;
    			}else if(data.status=="20028"){
	        		loginDialog();
	        	}else{
	        		errorDialog(data.message);
	        	}
    		});
        }
        function OKDialog(title,content){
        	swal(
        		    title,
        		    content,
        		    'success'
        		  ).then(function () {
        			  window.location.href='<%=path%>/view/automarket/smsModelHome';
        			})
        }
        
        
        var wordLength=0;
        var smsPriceNum=1;
        //当前
        var current;
        //剩余
        var remain;
        
        var initLength=6;
        
        var shortUrl;
        //更新新短信输入数量 
        function reloadCountWordNum(){
        	initLength=5;
        	autograph_name=$("#autograph  option:selected").text();
        	initLength=initLength+autograph_name.length+2;
        	sms_content=$('#ccomment').val();
        	if(isHaveStr(sms_content,"[活动短链]")){
        		initLength=initLength+13;
        	}
        	
        	if(StringEmpty(sms_content)){
				console.log("newContent------>"+sms_content);
        		$('.s_textarea').text("【"+autograph_name+"】"+sms_content+" TD退订");
        	}else{
        		$('.s_textarea').text("");
        	}
        	
        	
        	wordLength=sms_content.length;
        	console.log(wordLength);
        	if(smsPriceNum==1){
        		smsPriceNum=parseInt(((wordLength/(70-initLength))+1));
        	}else{
        		smsPriceNum=parseInt((((wordLength+initLength)/70)+1));
        	}
        	$('#remain').html(smsPriceNum);
        	if(smsPriceNum==1){
        		current=(70-initLength)-(wordLength%70);
        	}else{
        		current=70-((wordLength+initLength)%70);
        	}
        	$('#current').html(current);
        }
        
        function deleteOne(id){
        	var url="<%=path%>/smsBatch/ajaxDeleteSmsBatch"
        	$.post(url, {
				"cid" : cid,
				"uid" : uid,
				"access_token" : access_token,
				"id" : id,
			}, function(data) {
				if (data.status == 200) {
					window.location.href='<%=path%>/view/sms/smsBatch';
				} else if(data.message=="20028"){
					loginDialog();
				}else {
					window.location.href='<%=path%>/view/sms/smsBatch';
				}
			});
        }
        
        
        function preStep(){
			parent.$("#module-sms").iziModal('close');
        }
       
    </script>
    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
</body>
</html>
